import service from "../utils/request";

//  数据字典类型
export function getDictTypeList(params:any) {
  return service.get(`/dict/type`, { params });
}
export function createDictType(data:any) {
  return service.post(`/dict/type`, data);
}
export function editDictType(id:number,data:any) {
  return service.put(`/dict/type/${id}`,data);
}
export function deleteDictType(id:number) {
  return service.delete(`/dict/type/${id}`);
}
//  数据字典
export function getDictList(params:any,id:number) {
  return service.get(`/dict/type/${id}/data`, { params });
}
export function createDict(data:any) {
  return service.post(`/dict/data`, data);
}
export function editDict(id:number,data:any) {
  return service.put(`/dict/data/${id}`,data);
}
export function deleteDict(id:number) {
  return service.delete(`/dict/data/${id}`);
}
export function byDictToList(params:any) {
  return service.get(`/dict/data`, { params });
}